# 列表中保存若干个数字，
# 计算数字的和，最小值，最大值，平均数

def count_num(date):
    sum = 0
    min_num = 0
    max_num = 0
    index = 0
    num = 0
    while index < len(date):
        num = date[index]
        sum += num
        if min_num == 0 or min_num > date[index]:
            min_num = date[index]
        if max_num == 0 or max_num < date[index]:
            max_num = date[index]
        index += 1
    avg = sum / len(date)

    return sum, min_num, max_num, avg
